package 栈;

public class Stack{
	private ArrayList list = new ArrayList();
	
	public int size() {
		return list.size();
	}
	
	public boolean isEmpty() {
		return list.isEmpty();
	}
	
	public void push(int element) {
		list.add(element);
	}
	
	public int pop() {
		
		return list.remove(list.size() -1);
	}
	
	public int top() {
		
		return list.get(list.size() -1);
	}
}
